package com.example.logisticsservice.listener;

import com.example.orderservice.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "order.create")
public class OrederCreateListener {
    @RabbitHandler
    public void ListenerQueue(String message) {
        System.out.println("接收到订单：" + message);
    }

    @RabbitHandler
    public void ListenerQueue(Integer message) {
        System.out.println("接收到订单：" + message);
    }

    @RabbitHandler
    public void ListenerQueue(OrderInfo orderInfo) {
        System.out.println("接收到订单：" + orderInfo);
    }
}
